import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import layout from '../layout/index.vue'
import layoutWap from '../layout/wap.vue'
type RouteConfig = RouteRecordRaw &
{
	//导航是否显示到左侧   false:不显示
	hidden?: boolean,
	//是否显示顶部tabs切换   false:不显示
	isTabs?: boolean,
	children?: { hidden?: boolean }
};
const routes: Array<RouteConfig> = [
	{
		path: '/',
		hidden: false,
		component: () => import('../views/account/login.vue')
	},
	{
		path: '/account/user',
		hidden: false,
		component: () => import('../views/account/user.vue')
	},
	{
		path: '/account/team',
		hidden: false,
		component: () => import('../views/account/team.vue')
	},
	{
		path: '/autoGrade/scoring',
		hidden: false,
		component: () => import('../views/autoGrade/scoring.vue')
	},
	{
		path: '/autoGrade/groupRelayScoring',
		hidden: false,
		meta: {title: "团体接力"},
		component: () => import('../views/autoGrade/groupRelayScoring.vue')
	},
	{
		path: '/autoGrade/programScoring',
		hidden: false,
		meta: {title: "编程挑战"},
		component: () => import('../views/autoGrade/programScoring.vue')
	},
	{
		path: '/autoGrade/logisticsHandlingScoring',
		hidden: false,
		meta: {title: "物流搬运"},
		component: () => import('../views/autoGrade/logisticsHandlingScoring.vue')
	},
	{
		path: '/autoGrade/beeDanceScoring',
		hidden: false,
		meta: {title: "蜂群舞蹈"},
		component: () => import('../views/autoGrade/beeDanceScoring.vue')
	},
	{
		path: '/team/index',
		name: 'course0',
		meta: { title: "代表队信息", group: 'team', iconPath: require("@/assets/common/deputy.png"), selectedIconPath: require("@/assets/common/deputy_active.png") },
		component: layout,
		children: [
			{
				path: '/team/index',
				hidden: false,
				meta: { title: "代表队信息", group: 'team', btns: 'team' },
				component: () => import('../views/team/index.vue')
			},
			{
				path: '/team/update',
				hidden: false,
				meta: { title: "代表队信息", group: 'team', btns: 'team-update' },
				component: () => import('../views/team/update.vue')
			},
			{
				path: '/team/addUser',
				hidden: false,
				meta: { title: "添加领队", group: 'player' },
				component: () => import('../views/team/addUser.vue')
			},
			{
				path: '/team/addTeacher',
				hidden: false,
				meta: { title: "添加老师", group: 'teacher' },
				component: () => import('../views/team/addUser.vue')
			},
			{
				path: '/team/addLeader',
				hidden: false,
				meta: { title: "添加领队", group: 'team' },
				component: () => import('../views/team/addUser.vue')
			}
		]
	},
	{
		path: '/player',
		meta: { title: "本队选手", group: "player", iconPath: require("@/assets/common/player.png"), selectedIconPath: require("@/assets/common/player_active.png") },
		component: layout,
		children: [
			{
				path: '/player',
				name: 'player',
				meta: { title: "本队选手", group: "player", btns: 'player' },
				hidden: false,
				component: () => import('../views/player/index.vue')
			},
			{
				path: '/contestList',
				name: 'contestList',
				meta: { title: "参赛选手-查看", group: "player" },
				hidden: false,
				component: () => import('../views/player/contestList.vue')
			},
			{
				path: '/contestInfo',
				name: 'contestInfo',
				meta: { title: "参赛选手-查看-参赛信息", group: "player" },
				hidden: false,
				component: () => import('../views/player/contestInfo.vue')
			},

			{
				path: '/encourage',
				name: 'encourage',
				meta: { title: "参赛选手-查看-获奖证书", group: "player" },
				hidden: false,
				component: () => import('../views/player/encourage.vue')
			}
		]
	},
	{
		path: '/space',
		name: 'space',
		meta: { title: "指导导师", group: 'teacher', iconPath: require("@/assets/common/teacher.png"), selectedIconPath: require("@/assets/common/teacher_active.png") },
		component: layout,
		children: [
			{
				path: '/space',
				name: 'space-index',
				hidden: false,
				meta: { title: "指导导师", group: 'teacher', btns: 'teacher' },
				component: () => import('../views/noData.vue')
			}
		]
	},
	{
		path: '/enroll',

		name: '',
		meta: { title: "参赛报名", group: "enroll", iconPath: require("@/assets/common/enroll.png"), selectedIconPath: require("@/assets/common/enroll_active.png") },
		component: layout,
		children: [
			{
				path: '/enroll/list',
				meta: { title: "参赛报名", group: "enroll", },
				component: () => import('../views/enroll/list.vue')
			},
			{
				path: '/enroll/matchEnroll',
				hidden: false,
				meta: { title: "参赛报名-赛事报名", group: "enroll", },
				component: () => import('../views/enroll/matchEnroll.vue')
			},
			{
				path: '/enroll/individualEnroll',
				hidden: false,
				meta: { title: "参赛报名-赛事报名-个人", group: "enroll", },
				component: () => import('../views/enroll/individualEnroll.vue')
			}, {
				path: '/enroll/groupEnroll',
				hidden: false,
				meta: { title: "参赛报名-赛事报名-团体", group: "enroll", },
				component: () => import('../views/enroll/groupEnroll.vue')
			}, {
				path: '/enroll/enrollList',
				//hidden: false,
				meta: { title: "报名记录", group: "enroll", },
				component: () => import('../views/enroll/enrollList.vue')
			}, {
				path: '/enroll/enrollInfo',
				//hidden: false,
				meta: { title: "报名信息", group: "enroll", },
				component: () => import('../views/enroll/enrollInfo.vue')
			},{
				path: '/enroll/enrollInfo-detail',
				//hidden: false,
				meta: { title: "报名信息详情", group: "enroll", },
				component: () => import('../views/enroll/enrollInfo-detail.vue')
			}, {
				path: '/enroll/confirmEnrollInfo',
				//hidden: false,
				meta: { title: "确认晋级", group: "enroll", },
				component: () => import('../views/enroll/confirmEnrollInfo.vue')
			}, {
				path: '/enroll/promotion',
				hidden: false,
				meta: { title: "晋级确认", group: "enroll", },
				component: () => import('../views/enroll/promotion.vue')
			},
			{
				path: '/enroll/drawList',
				hidden: false,
				meta: { title: "抽签相关", group: "enroll", },
				component: () => import('../views/enroll/drawList.vue')
			},
			{
				path: '/enroll/draw',
				hidden: false,
				meta: { title: "抽签-开始抽签", group: "enroll", },
				component: () => import('../views/enroll/draw.vue')
			},

		]
	},
	{
		path: '/info',
		name: 'info',
		meta: { title: "用户信息", group: 'my', iconPath: require("@/assets/common/notice.png"), selectedIconPath: require("@/assets/common/notice_active.png") },
		component: layout,
		children: [
			{
				path: '/my',
				name: 'my',
				hidden: false,
				meta: { title: "用户信息", group: 'my', },
				component: () => import('../views/account/my.vue')
			},
			{
				path: '/info',
				name: 'info',
				hidden: false,
				meta: { title: "用户信息", group: 'my', btns: 'info' },
				component: () => import('../views/account/info.vue')
			}
		]
	},
	{
		path: '/contestList',
		name: 'contestList',
		meta: { title: "参赛记录", group: 'contest', iconPath: require("@/assets/common/notice.png"), selectedIconPath: require("@/assets/common/notice_active.png") },
		component: layout,
		children: [
			{
				path: '/contestList',
				name: 'contestList',
				hidden: false,
				meta: { title: "参赛记录", group: 'contest' },
				component: () => import('../views/player/contestList.vue')
			}
		]
	},
	{
		path: '/cerList',
		name: 'cerList',
		meta: { title: "我的证书", group: 'cerList', iconPath: require("@/assets/common/notice.png"), selectedIconPath: require("@/assets/common/notice_active.png") },
		component: layout,
		children: [
			{
				path: '/cerList',
				name: 'cerList',
				hidden: false,
				meta: { title: "我的证书", group: 'cerList' },
				component: () => import('../views/cer/cerStudent.vue')
			},
			{
				path: '/myCer',
				name: 'myCer',
				hidden: false,
				meta: { title: "我的证书", group: 'cerList' },
				component: () => import('../views/cer/myCer.vue')
			}
		]
	},
	{
		path: '/cerTeacherList',
		name: 'cerTeacherList',
		meta: { title: "我的证书", group: 'cerTeacherList', iconPath: require("@/assets/common/notice.png"), selectedIconPath: require("@/assets/common/notice_active.png") },
		component: layout,
		children: [
			{
				path: '/cerTeacherList',
				name: 'cerTeacherList',
				hidden: false,
				meta: { title: "我的证书", group: 'cerTeacherList' },
				component: () => import('../views/cer/cerTeacher.vue')
			}
		]
	},
	{
		path: '/notice',
		name: 'notice',
		meta: { title: "我的通知", group: 'notice', iconPath: require("@/assets/common/notice.png"), selectedIconPath: require("@/assets/common/notice_active.png") },
		component: layout,
		children: [
			{
				path: '/notice',
				name: 'notice',
				hidden: false,
				meta: { title: "我的通知", group: 'notice' },
				component: () => import('../views/account/notice.vue')
			},
			{
				path: '/notice/detail',
				hidden: false,
				meta: { title: "通知详情", group: 'notice' },
				component: () => import('../views/account/noticeDetail.vue')
			},
			{
				path: '/notice/detail2',
				hidden: false,
				meta: { title: "通知详情", group: 'notice' },
				component: () => import('../views/account/noticeDetail2.vue')
			}
		]
	},
	{
		path: '/certificateStudent',
		hidden: false,
		component: () => import('../views/certificateStudent.vue')
	},
	{
		path: '/certificateTeacher',
		hidden: false,
		component: () => import('../views/certificateTeacher.vue')
	},
	{
		path: '/certificate',
		hidden: false,
		component: () => import('../views/account/certificate.vue')
	},

	{
		path: '/wap-auth',
		hidden: false,
		component: layoutWap,
		children: [
			{
				path: '/auth/login',
				meta: { title: "登录" },
				component: () => import('../wap/account/login.vue')
			},
			{
				path: '/auth/agreement',
				meta: { title: "隐私协议" },
				component: () => import('../wap/account/agreement.vue')
			},
			{
				path: '/auth/register',
				meta: { title: "注册" },
				component: () => import('../wap/account/register.vue')
			},
			{
				path: '/wap/info',
				meta: { title: "用户信息" },
				component: () => import('../wap/account/info.vue')
			},
		]
	},
	{
		path: '/wap-certificate',
		hidden: false,
		component: layoutWap,
		children: [
			{
				path: '/wap/certificate',
				meta: { title: "证书查询" },
				component: () => import('../wap/account/certificate.vue')
			},
			{
				path: '/wap/certificate_teacher',
				meta: { title: "证书列表" },
				component: () => import('../wap/certificate/certificate_teacher.vue')
			},
			{
				path: '/wap/certificate_student',
				meta: { title: "证书列表" },
				component: () => import('../wap/certificate/certificate_student.vue')
			},
			{
				path: '/certificate/success',
				meta: { title: "证书" },
				component: () => import('../wap/certificate/success.vue')
			}
		]
	},
	{
		path: '/wap/team/index',
		name: 'wap-team-index',
		meta: { title: "代表队信息", group: 'wap-team', iconPath: require("@/assets/common/deputy.png"), selectedIconPath: require("@/assets/common/deputy_active.png") },
		component: layoutWap,
		children: [
			{
				path: '/wap/team/index',
				hidden: false,
				meta: { title: "代表队信息", group: 'wap-team', btns: 'team' },
				component: () => import('../wap/team/index.vue')
			},
			{
				path: '/wap/team/addLeader',
				hidden: false,
				meta: { title: "新增代表队信息", group: 'wap-team', btns: 'team' },
				component: () => import('../wap/team/addUser.vue')
			},
			{
				path: '/wap/team/update',
				hidden: false,
				meta: { title: "修改代表队信息", group: 'wap-team', btns: 'team' },
				component: () => import('../wap/team/update.vue')
			},

		]
	},
	{
		path: '/wap-match',
		hidden: false,
		component: layoutWap,
		children: [
			{
				path: '/match/sign_up_list',
				meta: { title: "报名记录" },
				component: () => import('../wap/match/sign_up_list.vue')
			},
			{
				path: '/match/promotion',
				meta: { title: "晋级赛信息" },
				component: () => import('../wap/match/promotion.vue')
			},
			{
				path: '/match/sign_up_info',
				meta: { title: "赛事信息" },
				component: () => import('../wap/match/sign_up_info.vue')
			},
			{
				path: '/match/list',
				meta: { title: "参赛报名列表" },
				component: () => import('../wap/match/match_list.vue')
			}, {
				path: '/match/info',
				meta: { title: "参赛报名详情" },
				component: () => import('../wap/match/match_info.vue')
			}, {
				path: '/match/sign_up_one',
				meta: { title: "参赛报名-个人" },
				component: () => import('../wap/match/sign_up_one.vue')
			},
			{
				path: '/match/sign_up_team',
				meta: { title: "参赛报名-团体" },
				component: () => import('../wap/match/sign_up_team.vue')
			},
			{
				path: '/match/player',
				meta: { title: "选手列表" },
				component: () => import('../wap/match/player.vue')
			},
			{
				path: '/match/player_info',
				meta: { title: "选手信息" },
				component: () => import('../wap/match/player_info.vue')
			},
			{
				path: '/match/player_match_list',
				meta: { title: "选手参赛列表" },
				component: () => import('../wap/match/player_match_list.vue')
			},
			{
				path: '/match/player_match_info',
				meta: { title: "选手参赛详情" },
				component: () => import('../wap/match/player_match_info.vue')
			},
			{
				path: '/match/teacher',
				meta: { title: "指导老师" },
				component: () => import('../wap/match/teacher.vue')
			},
			{
				path: '/match/certificate',
				meta: { title: "获奖证书" },
				component: () => import('../wap/match/certificate.vue')
			},
			{
				path: '/match/team_leader_add',
				meta: { title: "添加领队" },
				component: () => import('../wap/match/team_leader_add.vue')
			},
			{
				path: '/match/team_leader_edit',
				meta: { title: "编辑领队" },
				component: () => import('../wap/match/team_leader_edit.vue')
			},
			{
				path: '/match/team_leader_info',
				meta: { title: "领队详情" },
				component: () => import('../wap/match/team_leader_info.vue')
			}
		]
	},
	{
		path: '/wap-notice',
		hidden: false,
		component: layoutWap,
		children: [

			{
				path: '/wap/notice/list',
				meta: { title: "我的通知" },
				component: () => import('../wap/notice/list.vue')
			},
			{
				path: '/wap/notice/detail_info',
				meta: { title: "通知详情" },
				component: () => import('../wap/notice/detail.vue')
			},
			{
				path: '/wap/notice/detail_info2',
				meta: { title: "通知详情" },
				component: () => import('../wap/notice/detail2.vue')
			}
		]
	},

];

const router = createRouter({
	history: createWebHashHistory(),
	routes,
});

export default router;
